package cn.lbwfree.day3_12;

import java.util.Scanner;

/**
 * @date:2020年3月12日
 * @author:lbwfree
 * @number:BASIC-11 十六进制转十进制
 */
public class Hex_int {
	public static void main(String[] args) {
		Scanner inScanner = new Scanner(System.in);
		String hexString = inScanner.next();
		if (hexString.length()>8) {
			return;
		}
		System.out.println(Long.parseLong(hexString, 16));
	}
}
